import request from '@/utils/request'

export default {
    getAllWork() {
        return request({
            url: '/weddingindex/work/getAll',
            method: 'get',
        })
    },
    getWorkPageVo(current, limit, id, userId, allList) {
        return request({
          url: `/weddingindex/work/getWorkPageVo/${current}/${limit}/${id}/${userId}`,
          method: 'post',
          data: allList
        })
      },
      collectAdd(id, userId) {
        return request({
          url: `weddingindex/work/collectAdd/${id}/${userId}`,
          method: 'get'
        })
      },
      collectSubtract(id, userId) {
        return request({
          url: `weddingindex/work/collectSubtract/${id}/${userId}`,
          method: 'get'
        })
      },
      goodAdd(id, userId) {
        return request({
          url: `weddingindex/work/goodAdd/${id}/${userId}`,
          method: 'get'
        })
      },
      goodSubtract(id, userId) {
        return request({
          url: `weddingindex/work/goodSubtract/${id}/${userId}`,
          method: 'get'
        })
      },
      getByWorkId(id) {
        return request({
          url: `weddingindex/work/getByWorkId/${id}`,
          method: 'get'
        })
      },
      addWork(work) {
        return request({
          url: `weddingadmin/work/addWork`,
          method: 'POST',
          data: work,
        })
      },
      getAllListByUserId(id) {
        return request({
          url: `weddingindex/work/getAllListByUserId/${id}`,
          method: 'GET',
        })
      }
}
